Draft: Dataset add named graph#2592
Conversation
TODO: add tests and other needed methods
aucampia
left a comment
There was a problem hiding this comment.
Thanks for the draft PR @Murloc6 - I'm not sure that the setter for identifier will interface properly with the backing store.
I'm also not entirely sure about named graph, I think we need to ensure the semantics is clear for this in terms of pre and post conditions, but if it will ensure all triples in g will go into the graph named named_graph_identifier then it is good.
| return self.graph(g) | ||
|
|
||
| def add_named_graph( | ||
| self, named_graph_identifier: IdentifiedNode, g: Optional[Union[_ContextIdentifierType, _ContextType, str]] |
There was a problem hiding this comment.
| self, named_graph_identifier: IdentifiedNode, g: Optional[Union[_ContextIdentifierType, _ContextType, str]] | |
| self, identifier: IdentifiedNode, graph: Optional[Union[_ContextIdentifierType, _ContextType, str]] |
I'm not sure why g/graph is not of type Graph though, which it ideally should be. It could also maybe be worth it to take Iterable[_TripleType] as type.
|
Can we add |
We should get rid of Graph.identifier but |
|
Maintainers will try to incorporate all these changes into a new Dataset API scheduled for RDFLib 8.x due for release in late 2024 |
This is a draft PR to add to the discussion from #2591